Repository navigation
Conversation
Document how the conversion table is read (units per base unit), the convention the inverted entries broke, and replace the rounded lb, mmHg and inHg constants with their exact definitions so the definition test can run at rel=1e-9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW574kgc6gnnChDhsWmRZ
"g" is gram in the units table, so converting with the metric unit_system["acceleration"] would apply a mass factor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW574kgc6gnnChDhsWmRZ
convert_units_Functions scaled get_source() and renamed the axis labels in place, so converting a Function twice applied the factor to data already converted. Work on copies, and run every unit definition through the Function path on both axes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW574kgc6gnnChDhsWmRZ
The importer divided a view of _data in place by UNITS_CONVERSION_DICT, so the stored data turned into SI while still labelled with the original units, and a unit outside the table (degC included) raised a bare KeyError. Convert through a new units.convert_to_base_unit, which handles temperatures and raises the module's ValueError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW574kgc6gnnChDhsWmRZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to RocketPy-Team#1199, from its review.
convert_unitsno longer edits theFunctionit is given, andFlightDataImporterconverts through a newconvert_to_base_unitinstead of dividing its read data in place, so a unit outside the table (degCincluded) raises the module'sValueErrorrather than aKeyError. The table now documents how it is read and uses the exact pound and mercury constants, so the definition test runs atrel=1e-9, and the metricEnvironmentAnalysisacceleration unit is"gs", since"g"is gram. The changelog is filled in on merge from RocketPy-Team#1199's title and body, so the note thatft/s^2,atm,mg,g,degandgradresults change belongs in that description.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDW574kgc6gnnChDhsWmRZ